from kyb_caps import *

#点击同意，
driver.find_element(By.ID,'com.baidu.homework:id/iknow_alert_dialog_button2').click()
#同意开启
driver.find_element(By.ID,'com.baidu.homework:id/tv_agree_click').click()
#允许打电话权限
driver.find_element(By.ID,'com.android.packageinstaller:id/permission_allow_button').click()
driver.find_element(By.ID,'com.android.packageinstaller:id/permission_allow_button').click()
#点击密码登录
driver.find_element(By.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget'
                             '.FrameLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget'
                             '.FrameLayout/android.widget.LinearLayout/android.widget.LinearLayout/android.widget'
                             '.LinearLayout/android.widget.LinearLayout/android.widget.LinearLayout/android.widget'
                             '.RelativeLayout/android.widget.LinearLayout/android.widget.ImageView').click()
#手机号码
driver.find_element(By.ID,'com.baidu.homework:id/passport_phone_number_input_edit').clear()
driver.find_element(By.ID,'com.baidu.homework:id/passport_phone_number_input_edit').send_keys('19836500980')
#密码
driver.find_element(By.ID,'com.baidu.homework:id/passport_password_input_view').clear()
driver.find_element(By.ID,'com.baidu.homework:id/passport_password_input_view').send_keys('zuoyebang')

driver.find_element(By.ID,'com.baidu.homework:id/tv_phone_enter').click()

